<template>
    <div>
        <div class="mui-content">
            <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
                <li class="mui-table-view-cell">
                    <div class="mui-table">
                        <div class="mui-table-cell mui-col-xs-11">
                            <h4 class="username">用户名</h4>
                            <span class="member_content">{{userinfo.account}}</span>
                        </div>
                    </div>
                </li>
                <li class="mui-table-view-cell">
                    <div class="mui-table">
                        <div class="mui-table-cell mui-col-xs-11">
                            <h4 class="username">身份认证</h4>
                            <span class="member_content">{{userinfo.name}}</span>
                        </div>
                    </div>
                </li>
                <li class="mui-table-view-cell">
                    <div class="mui-table">
                        <div class="mui-table-cell mui-col-xs-11">
                            <h4 class="username">个人邮箱</h4>
                            <span class="member_content">{{userinfo.email}}</span>
                        </div>
                    </div>
                </li>
                <li class="mui-table-view-cell">
                    <div class="mui-table">
                        <div class="mui-table-cell mui-col-xs-11">
                            <h4 class="username">创建时间</h4>
                            <span class="member_content">{{userinfo.created_time | dataFormat}}</span>
                        </div>
                    </div>
                </li>

            </ul>
        </div>

        <div class="list2">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell">
                    <a class="mui-navigate-right">
                        <h4 class="username">邀请有礼</h4>
                        <span class="mui-badge">NM$L</span>
                    </a>
                </li>
                <li class="mui-table-view-cell">
                    <a class="mui-navigate-right">
                        <h4 class="username"> 我的收藏</h4>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                isLogin:sessionStorage.getItem('token'),
                userinfo:[]
            }
        },
        created(){
            this.getUserInfo()
        },
        methods:{
           getUserInfo(){
               this.$http.post('Userinfo', {
                   account:this.isLogin
               } ).then(result => {
                   this.userinfo = result.body;
               })
           }
        }
    }
</script>

<style scoped>
    .mui-table h4,.mui-table h5,.mui-table .mui-h5,.mui-table .mui-h6,.mui-table p{
        margin-top: 0;
    }
    .mui-table h4{
        line-height: 21px;
        font-weight: 500;
    }

    .mui-table .oa-icon{
        position: absolute;
        right:0;
        bottom: 0;
    }
    .mui-table .oa-icon-star-filled{
        color:#f14e41;
    }
    .username{
        font-size:15px;
        font-weight: normal;
    }
    .mui-table-cell{
        display: flex;
        justify-content: space-between;
        margin:0;
    }
    .member_content{
        margin:0;
        padding: 0;
        font-size:15px;
        color: #666;
    }
    .list2{
        margin-top:10px;
    }
    .mui-badge{
        background-color: #ff402f;
        color:#fff;
        font-size:11px;
    }
</style>